package com.ljx.offer;

/**
 * @author 李捷禧
 * Date: 2023/3/12
 * ClassName: C11
 */

public class C11 {
    public int minArray(int[] numbers) {
        for (int i = 1; i < numbers.length; i++) {
            if(numbers[i - 1] > numbers [i]){
                return numbers[i];
            }
        }
        return numbers[0];
    }

    public static void main(String[] args) {
        int[] arr = {3,4,5,2};
        System.out.println(new C11().minArray(arr));
    }

}
